Use GtkSnapshot getters
authorMatthias Clasen <mclasen@redhat.com>
Sun, 11 Mar 2018 05:29:46 +0000 (00:29 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 11 Mar 2018 05:31:44 +0000 (00:31 -0500)
We can avoid direct struct access and gtksnapshotprivate.h
everywhere.

12 files changed:
gtk/gskpango.c
gtk/gtkcssimage.c
gtk/gtkcssimageprivate.h
gtk/gtkcssshadowvalue.c
gtk/gtkiconview.c
gtk/gtkmagnifier.c
gtk/gtkoverlay.c
gtk/gtkrenderborder.c
gtk/gtkrendericon.c
gtk/gtkstack.c
gtk/gtktreeview.c
gtk/gtkwidget.c

index 04b58f566eaed0d8e0b4de436c86b54d88fa8729..e293759d2da98c5c3e3a344831303924c85c2110 100644 (file)
@@ -21,7 +21,7 @@
 
 #include "gsk/gsk.h"
 #include "gskpango.h"
-#include "gtksnapshotprivate.h"
+#include "gtksnapshot.h"
 
 #include <math.h>
 
@@ -155,7 +155,7 @@ gsk_pango_renderer_show_text_glyphs (PangoRenderer        *renderer,
   if (node == NULL)
     return;
 
-  if (crenderer->snapshot->record_names)
+  if (gtk_snapshot_get_record_names (crenderer->snapshot))
     {
       char name[64];
       g_snprintf (name, sizeof (name), "Glyphs<%d>", glyphs->num_glyphs);
index 6d0f44980342860e990ffb2129209fe8a4629c81..eee9c5c0d891ec4ce64e9bfe566ad3279e4f2bde 100644 (file)
@@ -22,7 +22,7 @@
 #include "gtkcssimageprivate.h"
 
 #include "gtkcssstyleprivate.h"
-#include "gtksnapshotprivate.h"
+#include "gtksnapshot.h"
 
 /* for the types only */
 #include "gtk/gtkcssimagecrossfadeprivate.h"
index e4b06e2e759985be1cb5a40f2eeae87874ff7791..bb88d1c5f3cf732ac262ca790806f6b423891984 100644 (file)
@@ -25,7 +25,7 @@
 
 #include "gtk/gtkcssparserprivate.h"
 #include "gtk/gtkcsstypesprivate.h"
-#include "gtk/gtksnapshotprivate.h"
+#include "gtk/gtksnapshot.h"
 
 G_BEGIN_DECLS
 
index c81d82b405b30d3d7ac5c10c109af00cbb0a1bd6..eb5b560c6ba5f4267e95ce4418be0ce8ba12e86b 100644 (file)
@@ -24,7 +24,7 @@
 #include "gtkcsscolorvalueprivate.h"
 #include "gtkcssnumbervalueprivate.h"
 #include "gtkcssrgbavalueprivate.h"
-#include "gtksnapshotprivate.h"
+#include "gtksnapshot.h"
 #include "gtkstylecontextprivate.h"
 #include "gtkpango.h"
 
@@ -1053,7 +1053,7 @@ gtk_css_shadow_value_snapshot_outset (const GtkCssValue    *shadow,
                                      _gtk_css_number_value_get (shadow->voffset, 0),
                                      _gtk_css_number_value_get (shadow->spread, 0),
                                      _gtk_css_number_value_get (shadow->radius, 0));
-  if (snapshot->record_names)
+  if (gtk_snapshot_get_record_names (snapshot))
     gsk_render_node_set_name (node, "Outset Shadow");
   gtk_snapshot_append_node (snapshot, node);
   gsk_render_node_unref (node);
@@ -1084,7 +1084,7 @@ gtk_css_shadow_value_snapshot_inset (const GtkCssValue   *shadow,
                                     _gtk_css_number_value_get (shadow->voffset, 0),
                                     _gtk_css_number_value_get (shadow->spread, 0),
                                     _gtk_css_number_value_get (shadow->radius, 0));
-  if (snapshot->record_names)
+  if (gtk_snapshot_get_record_names (snapshot))
     gsk_render_node_set_name (node, "Inset Shadow");
   gtk_snapshot_append_node (snapshot, node);
   gsk_render_node_unref (node);
index e03640344ac2022dbae1c347e2ad2d1991db3df2..b0d5ae756df2a83bd65f704cd435f93cbb8fbe8e 100644 (file)
@@ -41,7 +41,7 @@
 #include "gtkprivate.h"
 #include "gtkscrollable.h"
 #include "gtksizerequest.h"
-#include "gtksnapshotprivate.h"
+#include "gtksnapshot.h"
 #include "gtkstylecontextprivate.h"
 #include "gtktreednd.h"
 #include "gtktypebuiltins.h"
index cc4e85081d828e56c39a5f45ac0032bd97c35c6d..875342a463b54e6379e9de3760ae8ef8c3f8089b 100644 (file)
@@ -19,7 +19,7 @@
 #include "gtk/gtk.h"
 #include "gtkmagnifierprivate.h"
 #include "gtkwidgetprivate.h"
-#include "gtksnapshotprivate.h"
+#include "gtksnapshot.h"
 #include "gtkintl.h"
 
 enum {
@@ -116,7 +116,7 @@ gtk_magnifier_snapshot (GtkWidget   *widget,
   g_signal_handler_block (priv->inspected, priv->draw_handler);
 
   inspected_snapshot = gtk_snapshot_new (gtk_snapshot_get_renderer (snapshot),
-                                         snapshot->record_names,
+                                         gtk_snapshot_get_record_names (snapshot),
                                          NULL,
                                          "MagnifierSnapshot");
 
index 90a930799b1b5bff173ae93268013254034792d0..fca3fb60987894c3fba63bab7b2f83a74a921966 100644 (file)
@@ -25,7 +25,7 @@
 #include "gtkscrolledwindow.h"
 #include "gtkwidgetprivate.h"
 #include "gtkmarshalers.h"
-#include "gtksnapshotprivate.h"
+#include "gtksnapshot.h"
 
 #include "gtkprivate.h"
 #include "gtkintl.h"
@@ -676,7 +676,7 @@ gtk_overlay_snapshot (GtkWidget   *widget,
               GtkSnapshot *child_snapshot;
 
               child_snapshot = gtk_snapshot_new (gtk_snapshot_get_renderer (snapshot),
-                                                 snapshot->record_names,
+                                                 gtk_snapshot_get_record_names (snapshot),
                                                  NULL,
                                                  "OverlayCaptureMainChild");
               gtk_snapshot_offset (child_snapshot, main_alloc.x, main_alloc.y);
index 8e9c059e07206a7ce9927fcc972e9e46d07d0204..132a30c21a78a165b7b53b6b7e5221cc07559cbf 100644 (file)
@@ -438,7 +438,7 @@ snapshot_frame_fill (GtkSnapshot          *snapshot,
   gsk_rounded_rect_offset (&offset_outline, off_x, off_y);
   
   node = gsk_border_node_new (&offset_outline, border_width, colors);
-  if (snapshot->record_names)
+  if (gtk_snapshot_get_record_names (snapshot))
     gsk_render_node_set_name (node, "Border");
   gtk_snapshot_append_node (snapshot, node);
   gsk_render_node_unref (node);
index 77b80bad1c3d5870df230ea1106e07478ff3c2bc..4b411a8626981e905c2f75e6205e22e3f5c68769 100644 (file)
@@ -28,7 +28,7 @@
 #include "gtkcssstyleprivate.h"
 #include "gtkcsstransformvalueprivate.h"
 #include "gtkiconthemeprivate.h"
-#include "gtksnapshotprivate.h"
+#include "gtksnapshot.h"
 
 #include <math.h>
 
index 172801e19431b91364adb358668e28761c667f7c..a14f4730d5159e26e6aa876fa6f321bb382128a3 100644 (file)
@@ -28,7 +28,7 @@
 #include "gtkcontainerprivate.h"
 #include "gtkprogresstrackerprivate.h"
 #include "gtksettingsprivate.h"
-#include "gtksnapshotprivate.h"
+#include "gtksnapshot.h"
 #include "gtkwidgetprivate.h"
 #include "a11y/gtkstackaccessible.h"
 #include "a11y/gtkstackaccessibleprivate.h"
@@ -1957,7 +1957,7 @@ gtk_stack_snapshot (GtkWidget   *widget,
               gtk_widget_get_allocation (priv->last_visible_child->widget,
                                          &priv->last_visible_surface_allocation);
               last_visible_snapshot = gtk_snapshot_new (gtk_snapshot_get_renderer (snapshot),
-                                                        snapshot->record_names,
+                                                        gtk_snapshot_get_record_names (snapshot),
                                                         NULL,
                                                         "StackCaptureLastVisibleChild");
               gtk_widget_snapshot (priv->last_visible_child->widget, last_visible_snapshot);
index e3657c9d92f4e930bde643e3004a5fe53ee5d320..c8be4bba9b24bc8047ac9ab13d4e50a8559d209e 100644 (file)
@@ -49,7 +49,7 @@
 #include "gtkrendericonprivate.h"
 #include "gtkscrollable.h"
 #include "gtksettingsprivate.h"
-#include "gtksnapshotprivate.h"
+#include "gtksnapshot.h"
 #include "gtkstylecontextprivate.h"
 #include "gtktooltip.h"
 #include "gtktreednd.h"
index e78f66272dc29fe5a2c44c1178e7c73ad4695144..72766c2c3c14b886a6da549231193f044ea6d3de 100644 (file)
@@ -60,7 +60,7 @@
 #include "gtkselection.h"
 #include "gtksettingsprivate.h"
 #include "gtksizegroup-private.h"
-#include "gtksnapshotprivate.h"
+#include "gtksnapshot.h"
 #include "gtkstylecontextprivate.h"
 #include "gtktooltipprivate.h"
 #include "gtktypebuiltins.h"